<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>滴答办公系统-角色列表</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="media/layui/css/layui.css" media="all">
<script src="media/js/jquery.min.js"></script>
</head>
<body>
	
	<div class="layui-container">
		<table class="layui-table" id="tbdata" lay-filter="tbop">
			<thead>
				<tr>
					<td>序号</td>
					<td>角色名称</td>
					<td>角色备注</td>
					<td>操作</td>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>01</td>
					<td>系统管理员</td>
					<td>管理系统事宜</td>
					<td>
						<a class="layui-btn layui-btn-mini" href="#" onclick="showPermissions();">编辑</a>
						<a class="layui-btn layui-btn-danger layui-btn-mini"
						lay-event="del" onclick="deleteCourse();">删除</a>
					</td>
				</tr>
				<tr>
					<td>02</td>
					<td>教务</td>
					<td>监督教学工作</td>
					<td><a class="layui-btn layui-btn-mini" href="#" onclick="showPermissions();">编辑</a>
						<a class="layui-btn layui-btn-danger layui-btn-mini"
						lay-event="del" onclick="deleteCourse();">删除</a>
					</td>
				</tr>
				<tr>
					<td>03</td>
					<td>讲师</td>
					<td>技术授课</td>
					<td><a class="layui-btn layui-btn-mini" href="#" onclick="showPermissions();">编辑</a>
						<a class="layui-btn layui-btn-danger layui-btn-mini"
						lay-event="del" onclick="deleteCourse();">删除</a>
					</td>
				</tr>
			</tbody>
		</table>
		<div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-1">
						   <a href="javascript:;" class="layui-laypage-prev layui-disabled" data-page="0">
							    <i class="layui-icon">&lt;</i>
						   </a> 
							    <span style="color:#009688;font-weight: bold;">1</span> 
							    <a href="#">2</a> 
							    <a href="#">3</a>  
							    <a href="#">4</a> 
							    <a href="#">5</a> 
							<a href="javascript:;" class="layui-laypage-next layui-disabled" data-page="2"> 
							    <i class="layui-icon">&gt;</i>
							</a> 
							<span class="layui-laypage-skip">到第
							   <input type="text" min="1" value="1" class="layui-input">页
								<button type="button" class="layui-laypage-btn">确定</button>
							</span> 
							<span class="layui-laypage-count">共 1 条</span> 
							<span class="layui-laypage-limits"> 
							    <select lay-ignore="">
							        <option value="10" selected="">10 条/页</option>
									<option value="20">20 条/页</option>
									<option value="30">30 条/页</option>
									<option value="40">40 条/页</option>
									<option value="50">50 条/页</option>
									<option value="60">60 条/页</option>
									<option value="70">70 条/页</option>
									<option value="80">80 条/页</option>
									<option value="90">90 条/页</option>
							</select>
							</span>
						</div>
	</div>
	
	<script src="media/layui/layui.js"></script>
	
	<script type="text/javascript">
	   function deleteCourse(){
		   layui.use('table', function() {
			   layer.confirm('是否确认删除角色?',function(index) {
				   layer.msg("删除成功", {icon : 6});
				   layer.msg("删除失败", {icon : 5});
			   });
		   });
	   }
	   
	   var form;
	   
	   function showPermissions(){
	   	  layui.use('table', function() {
					form=layui.form;
					layer.open({
						area: ['500px', '480px'],
						title: '权限管理',
						type: 1,
						content: $('#dvlay'), //这里content是一个普通的String
						btn: ['更新', '取消'],
						cancel: function() {}
					});
		    });
	   }
	   
	</script>
	
	
</body>
</html>


<div style="display: none;margin-top: 10px;width: 480px" id="dvlay">
    <form id="fm1" class="layui-form layui-form-pane" >
        <div class="layui-form-item" pane >
            <label class="layui-form-label">角色名称：</label>
            <div class="layui-input-inline">
                <input id="uid" name="id" class="layui-input">
            </div>
        </div>
         <div class="layui-form-item" pane >
            <label class="layui-form-label">角色备注：</label>
            <div class="layui-input-inline">
                <input id="uid" name="name" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">菜单：</label>
            <div class="layui-input-inline" id="dv1">
                 <input type="checkbox" name="rids" value="权限管理" title="权限管理">
                 <input type="checkbox" name="rids" value="专业管理" title="专业管理">
                 <input type="checkbox" name="rids" value="班级管理" title="班级管理">
                 <input type="checkbox" name="rids" value="学生管理" title="学生管理">
            </div>
        </div>
        <div class="layui-form-item" pane>
            <label class="layui-form-label">权限：</label>
            <div class="layui-input-inline" id="dv1">
                 <input type="checkbox" name="rids" value="用户新增" title="用户新增">
                 <input type="checkbox" name="rids" value="用户更新" title="用户更新">
                 <input type="checkbox" name="rids" value="用户删除" title="用户删除">
                 <input type="checkbox" name="rids" value="用户导入" title="用户导入">
                 <input type="checkbox" name="rids" value="员工新增" title="员工新增">
                 <input type="checkbox" name="rids" value="员工更新" title="员工更新">
                 <input type="checkbox" name="rids" value="员工导入" title="员工导入">
            </div>
        </div>
    </form>
</div>